From 02f7c0eaa22b9172c828e3a5cd8df4239b8e779d Mon Sep 17 00:00:00 2001 From: robertl Date: Fri, 26 Jan 2007 15:43:37 +0000 Subject: [PATCH] Use waypt_new in geo.c and then override the alt. --- geo.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/geo.c b/geo.c index c19706a96..9dbd84c9b 100644 --- a/geo.c +++ b/geo.c @@ -68,8 +68,14 @@ xg_tag_mapping loc_map[] = { void wpt_s(const char *args, const char **unused) { -// wpt_tmp = waypt_new(); - wpt_tmp = xcalloc(sizeof(*wpt_tmp), 1); + wpt_tmp = waypt_new(); + /* + * 'geo' doesn't really have an 'unknown' and doesn't have any + * concept of alt. Unfortunately, we have many reference files + * that have leaked the 'unknown_alt' value into them, so we paper + * over that here. + */ + wpt_tmp->altitude = 0; } void wpt_e(const char *args, const char **unused) -- 2.30.2